Sortable Array container template. More...
#include <tarray.h>
Public Member Functions | |
TSortableArray (int32 initSize=0, int32 delta=TArrayBase< T >::kDefaultDelta) | |
TSortableArray (const TSortableArray< T > &a) | |
TSortableArray (const TContainer< T > &c) | |
void | enableSorting (bool state) |
Enable or disable sorting. | |
bool | sortingEnabled () const |
Tell if sorting is currently enabled. | |
virtual TContainer< T > * | newInstance () const |
virtual int32 | index (const T &t) const |
virtual int32 | shouldGo (const T &t) const |
Sortable Array container template.
Sorting can be switched on and off during runtime.
TSortableArray | ( | int32 | initSize = 0 , |
|
int32 | delta = TArrayBase<T>::kDefaultDelta | |||
) | [inline] |
TSortableArray | ( | const TSortableArray< T > & | a | ) | [inline] |
TSortableArray | ( | const TContainer< T > & | c | ) | [inline] |
void enableSorting | ( | bool | state | ) | [inline] |
Enable or disable sorting.
"enableSorting" enables or disables sorting. On state change to enabled "doQuickSort" is automatically called
bool sortingEnabled | ( | ) | const [inline] |
Tell if sorting is currently enabled.
virtual TContainer<T>* newInstance | ( | ) | const [inline, virtual] |
Create a copy of this container.
Implements TContainer< T >.
virtual int32 index | ( | const T & | t | ) | const [inline, virtual] |
Get index of item.
Implements TArrayBase< T >.
virtual int32 shouldGo | ( | const T & | t | ) | const [inline, virtual] |
Get index for potential item.
Implements TArrayBase< T >.